package com.zhss.demo.register.server;

import java.util.LinkedList;
import java.util.Queue;

/**
 * @author xuhua
 * @create 2021-12-05 19:10
 * @description 增量注册表
 */
public class DeltaRegistry {
    /**
     * 服务增量实例队列
     */
    private Queue<ServiceRegistry.RecentlyChangedServiceInstance> recentlyChangedQueue;
    /**
     * 注册表中服务实例数量
     */
    private Long serviceInstanceTotalCount;

    public DeltaRegistry(Queue<ServiceRegistry.RecentlyChangedServiceInstance> recentlyChangedQueue,
                         Long serviceInstanceTotalCount) {
        this.recentlyChangedQueue = recentlyChangedQueue;
        this.serviceInstanceTotalCount = serviceInstanceTotalCount;
    }

    public Queue<ServiceRegistry.RecentlyChangedServiceInstance> getRecentlyChangedQueue() {
        return recentlyChangedQueue;
    }
    public void setRecentlyChangedQueue(LinkedList<ServiceRegistry.RecentlyChangedServiceInstance> recentlyChangedQueue) {
        this.recentlyChangedQueue = recentlyChangedQueue;
    }
    public Long getServiceInstanceTotalCount() {
        return serviceInstanceTotalCount;
    }
    public void setServiceInstanceTotalCount(Long serviceInstanceTotalCount) {
        this.serviceInstanceTotalCount = serviceInstanceTotalCount;
    }
}
